﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tedds_Tool.Automatables;
using LEET.CommonInterfaces.Compilers;

namespace Tedds_Tool.Compilers.LEET
{
    public class LEETCompilerFactory
    {
        Asserts asserts;
        IInstructionFactory Factory;
        IScriptFinder finder;

        public LEETCompilerFactory(Asserts a, IInstructionFactory fac, IScriptFinder find)
        {
            Factory = fac;
            asserts = a;
            finder = find;
        }

        public Compiler CreateCompiler()
        {
            AssertionSet asserts;
            switch (this.asserts)
            {
                case Asserts.NUnit:
                    asserts = new NUnitAssertionSet();
                    break;
                case Asserts.MSTest:
                default:
                    asserts = new MSTestAssertionSet();
                    break;
            }
            return new Compiler(asserts, Factory, finder);
        }
    }

    public enum Asserts
    {
        MSTest,
        NUnit,
        Portable
    }
}
